import { FieldType } from 'choerodon-ui/pro/lib/data-set/enum';

function handleDataSetChange({ value, oldValue }: { value: Date, oldValue: Date }) {
  console.log('[range dataset newValue]', value, '[oldValue]', oldValue);
}

const DateDs = () => ({
  autoCreate: true,
  fields: [
    { name: 'percent', type: FieldType.number, defaultValue: 75 },
  ],
  events: {
    update: handleDataSetChange,
  },
});

export default DateDs;